package com.aop;

/**
 * 歌唱家类
 */
public class Instrumentailst implements Performer {

  private String song;
  private Instrument instrument;

  public Instrumentailst() {

  }
  public void perform() {
    System.out.println("Playing "+song+" : ");
    instrument.play();
  }

  public String getSong() {
    return song;
  }

  public void setSong(String song) {
    this.song = song;
  }

  public Instrument getInstrument() {
    return instrument;
  }

  public void setInstrument(Instrument instrument) {//注入乐器
    this.instrument = instrument;
  }

}
